/**
 * Created by ztt on 2017/11/17.
 */
var express=require('express');
var app=express();
app.use(express.static('public'));
app.get('/login.html',function (req,res) {
    res.sendFile( __dirname + "/" + "login.html" );
});
app.get('/check', function (req, res) {

    // 输出 JSON 格式
    var response = {
        "first_name":req.query.first_name,
        "last_name":req.query.last_name
    };
    console.log(response);
    res.end(JSON.stringify(response));
});
var server=app.listen(3000,function () {
    var host = server.address().address
    var port = server.address().port
   console.log('http://%s:%s',host,port);
});